(function() {"use strict";var __module = CC_EDITOR ? module : {exports:{}};var __filename = 'preview-scripts/assets/Script/boxPrefab.js';var __require = CC_EDITOR ? function (request) {return cc.require(request, require);} : function (request) {return cc.require(request, __filename);};function __define (exports, require, module) {"use strict";
cc._RF.push(module, '0a2b1yi7RRBG5LvzDELPf7F', 'boxPrefab', __filename);
// Script/boxPrefab.js

"use strict";

cc.Class({
    extends: cc.Component,

    properties: {
        boxMessageDic: ""
    },

    // LIFE-CYCLE CALLBACKS:

    // onLoad () {},

    start: function start() {},
    init: function init(boxDic) {

        console.log("游戏盒子独立信息", boxDic);
        this.boxMessageDic = boxDic;
        var that = this;
        cc.loader.load({ url: boxDic["icon"], type: 'png' }, function (err, img) {

            var mylogo = new cc.SpriteFrame(img);

            that.node.getComponent(cc.Sprite).spriteFrame = mylogo;
        });
    },


    enterOtherGame: function enterOtherGame() {

        wx.navigateToMiniProgram({
            appId: this.boxMessageDic["appid"],
            success: function success(res) {
                console.log("成功进入其他游戏");
            }
        });
    }

    // update (dt) {},
});

cc._RF.pop();
        }
        if (CC_EDITOR) {
            __define(__module.exports, __require, __module);
        }
        else {
            cc.registerModuleFunc(__filename, function () {
                __define(__module.exports, __require, __module);
            });
        }
        })();
        //# sourceMappingURL=boxPrefab.js.map
        